import { getRequest, postRequest } from '/src/lib/axios';
export const ecoServices = {
  queryData: (param) => {
    return postRequest('/ecoServices/queryPage', {
      ...param,
      searchCount: true,
      sortItemList: [
        {
          isAsc: true,
          column: 'service_id',
        },
      ],
    });
  },
  // 物资供给
  queryProvisioning: (param) => {
    return postRequest('/provisioningServices/queryPage', {
      ...param,
      searchCount: true,
      sortItemList: [
        {
          isAsc: true,
          column: 'provisioning_service_id',
        },
      ],
    });
  },
  addProvisioning: (param) => {
    return postRequest('/provisioningServices/add', param);
  },
  deleteProvisioning: (param) => {
    return getRequest(`/provisioningServices/delete/${param}`);
  },

  // 文化服务
  queryCultural: (param) => {
    return postRequest('/culturalServices/queryPage', {
      ...param,
      searchCount: true,
      sortItemList: [
        {
          isAsc: true,
          column: 'cultural_service_id',
        },
      ],
    });
  },

  // 调节服务
  queryRegulating: (param) => {
    return postRequest('/regulatingServices/queryPage', {
      ...param,
      searchCount: true,
      sortItemList: [
        {
          isAsc: true,
          column: 'regulating_service_id',
        },
      ],
    });
  },
  Add: (param) => {
    return postRequest('/ecoServices/add', param);
  },
  Update: (param) => {
    return postRequest('/ecoServices/update', param);
  },
  Delete: (param) => {
    return getRequest(`/ecoServices/delete/${param}`);
  },
  // queryAssetsCategory: (param) => {
  //   return postRequest('/carbonAssetsCategory/queryPage', {
  //     ...param,
  //     searchCount: true,
  //     sortItemList: [
  //       {
  //         isAsc: true,
  //         column: 'ca_category_id',
  //       },
  //     ],
  //   });
  // },
};
